<html xmlns:th="http://www.thymeleaf.org">
<head lang="zh_CN" >
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>登录</title>
	<link rel="stylesheet" th:href="@{/css/login.css}" media="all">
	<link rel="stylesheet" th:href="@{/plugins/layui/css/layui.css}" media="all">
	<script type="text/javascript">
	if (window != top) 
		top.location.href = location.href; 
	</script>
</head>
<body class="login-bg">
<div class="login">
	<div class="message">GoFastDfs-管理登录</div>
	<div id="darkbannerwrap"></div>
	<form method="post" class="layui-form" action="/doLogin">
	    <input name="account" placeholder="用户名"  type="text" lay-verify="required" class="layui-input" >
	    <hr class="hr15">
	    <input name="password" lay-verify="required" placeholder="密码"  type="password" class="layui-input">
	    <hr class="hr15">
	    <div style="height: 20px;">
	    	<input type="checkbox" name="rememberMe" title="记住我" lay-skin="primary">
	    	<a href="#" style="float: right;color:#666">忘记密码</a>
	    </div>
	    <hr class="hr15">
	    <input class="loginin" value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit">
	</form>
</div>
<script th:src="@{/plugins/layui/layui.js}"></script>
<script type="text/javascript">
layui.use(['form','jquery','layer'], function(){
  var form = layui.form,$=layui.jquery,layer=layui.layer;
  form.on('submit(login)', function(data){
	  $.post("/doLogin",data.field,function(result){
		 if(result.state == 200){
			  location.href='/';
		 }else{
			 layer.msg(result.msg);
		 }
	  });
	  return false;
  });
});
</script>
</body>
</html>